<form class="search-w-box" onsubmit='searchdo(this);return false;'>
    <div class="search">
        <input type="search" name="search" id="searchBox" data-targ="{:url('mobile/search/index')}" value="{:input('param.search')}"  class="search-w-input" placeholder="搜一搜，找到你想要的" />
    </div>
</form>
<script>
    function searchdo(form) {
        var search = $('input[type=search]');

        if (search.val() === '')
            return;
        var url = search.attr('data-targ');

        var query = $('.search-w-box').find('input,select').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
        query = query.replace(/^&/g, '');
        if (url.indexOf('?') > 0) {
            url += '&' + query;
        } else {
            url += '?' + query;
        }
        window.location.href = url;
    }
</script>